package Kernel;

//import GUI.*;

import java.io.IOException;
import java.util.Calendar;
import java.util.GregorianCalendar;

import GUI.Accueil;

public class Main {
	
	//private static final Sauvegarde1 XMLTools = null;

	/**
	 * @param args
	 * @throws IOException
	 * @throws ClassNotFoundException
	 */
	public static void main(String[] args) throws IOException,
			ClassNotFoundException {


		Serveur serv = new Serveur();
		Accueil ac = new Accueil(serv);
		ac.setVisible(true);
		
		Vehicule av = new Avion();
		Bus bu = new Bus();
		Ville nice = new Ville("Nice", 350000, true, true, true, true);
		Ville monaco = new Ville("Monaco", 217000, true, true, true, true);
		GregorianCalendar depart=new GregorianCalendar(2012,Calendar.MARCH,15,10,20);
		GregorianCalendar arrivee=new GregorianCalendar(2012,Calendar.MARCH,15,10,45);
		Trajet traj = new Trajet("bustab",bu, nice,depart,monaco,arrivee,40.0,"Non Modifiable");
		serv.ajouterTrajet(traj);
		serv.ajouterVehicule(bu);
		serv.ajouterVehicule(av);
		serv.ajouterVille(monaco);
		serv.ajouterVille(nice);
		Client client=new Client(111,"Benard","Paul",serv);
		Billet billet=new Billet(ProfilPassager.ETUDIANT,client,traj);
		billet.TempsTrajet();
		serv.ajouterBillet(billet);
		serv.ajouterClient(client);
		System.out.println(""+billet);
		
		
		/*
		 * 
		HtmlBillet html = new HtmlBillet(billet);
		html.generationHtml();
		
		try {
            Sauvegarde1.encodeToFile(serv,"Sauvegarde-Serveur.xml");
           
        } catch(Exception e) {
            e.printStackTrace();
        }
        */
		
		
	}
}
